#!/bin/sh
set -e

echo >&2 "GOT CALL FOR $1"

if [ "$1" = "testsecret" ]; then
    echo -n "williwaw"
    exit 0
fi

if [ "$1" = "binarysecret" ]; then
    echo thGTxpjMkscn0PqBrQmJtVEsTvPvOrM7QXCdYcwb17tnFLNKa2dCLg+E5IC+VhTbxytcshM176DIRURKi46LmHCwbxzWNvM8hMdSN/ipugOdF/sUNklbxCDPJbe9R+0+fbW22059AsXbv51hZKr9OLViaxan50/072POfNTe9mufuFpY4sPooclHNsecKjd8j9BbwaCt7Tt3+/Xo+KNcavJsO4ZNxOqCIwhbHv+5q089LBmhamha323qidz8vMxjwFxgpQ9UyfgzbFXlkGcF0sH8vG3CSpMz1oPO2O8H7d78sa93Lf8+hjIEznNXryq3yFYUXGI7ANTDjKHWiXZd0dFQ+S3o206nKc8qVkQNsrblmEO8XEy/aJx2s4GjLEhqgwHVmv3HQoHqTwKJT+aayXcAsq/KVO6YvDoKB2SB/fDJp0k37PuNr9DgFxkI5ICcMJ87Aocri1cGf3cn1zBTTQ/bn+x6z7qejUX64Od5uaQlezljF8jrJKu6J67ScajCWyNSU7B0FbVUws5TfIQ+uEYOWqtY881vHKDjfX2MqY6vmuGgwDx8bc5pX9mLebWhdzleixMIwpaW9VvSdbLRkkp7qkWoca6Tqkr1Uv44N0IwSEnOwjaTlSTcRWtTN0Ij2SyJGYwMCD1A9mEd4p9UYKeYQ2LkKsSXr1Bk+mRIE6gOSNwKgb4i5fQJ+Cjc6drInApcU0gKLEy+IB86cbbCw2D17p7oF7s/h50BD93bxQC/DzvfUhdsNUh+jeaZGREN7m8GIchhqbuTtAVRAVAne9YzD8qNieKcA9TxNbIPqpOg9Ix6KDPFpTtqXv00/UPGJ+c6mNa3GubawAGHstO4+yKbCoEpSiYDu/dOSc5CC2edeKISPg49x6pmVuo3B11oSOshf/4qxjV9UX5lvgqlK2KVJMnx29raajnqYti35rdcQQDf2fsMRuRpcynpiU+7v3q95p8ezBSax8Ta9hN/YfcrFutMhN1V+SK67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